package com.coocaa.ops.plus.dashboard.v1.auth.ftl;

import com.coocaa.ops.plus.core.base.annotation.MyAuth;
import com.coocaa.ops.plus.core.base.enums.MyRoleEnums;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * @author bijiahao
 * @date : 2019/6/24.
 * @description 页面跳转
 *
 */
@Controller
@RequestMapping("/myExtend")
public class PlusFtlAction {

    /**
     * 扩展模块 登录页面
     *
     * @param request
     * @return
     * @throws Exception
     */
    @RequestMapping("/index")
    public String plugIndex(HttpServletRequest request) {
        return "index";
    }

    /**
     * 扩展模块-主页面
     *
     * @param request
     * @return
     * @throws Exception
     */
    @MyAuth(validAuth = true, hasRoles = {MyRoleEnums.ROLE_ADMIN})
    @RequestMapping(value = "/main")
    public String pluMain(HttpServletRequest request) {
        return "main";
    }


}
